﻿Option Explicit On
Option Strict On

''' <summary>
''' Clase de las citas
''' </summary>
''' <nombre> Antonio Ramos Torres </nombre>

Public Class Cita

    Private _myBBDD As BBDD

    Private _idCita As String
    Private _duracion As Integer
    Private _fecha As DateTime
    Private _horaInicio As DateTime
    Private _Cliente As Cliente
    Private _Empleado As Empleado
    Private _ListaTratamiento As List(Of Tratamiento)

    Public Sub New()
        _myBBDD = New BBDD
        _idCita = ""
        _duracion = 0
        _fecha = New Date
        _horaInicio = New Date
        _Cliente = New Cliente
        _Empleado = New Empleado
        _ListaTratamiento = New List(Of Tratamiento)
    End Sub

    Public Sub New(ByVal copia As Cita)
        _idCita = ""
        _duracion = copia.duracion
        _fecha = copia.fecha
        _Cliente = New Cliente
        _Empleado = New Empleado
        _horaInicio = copia.horaInicio
        _ListaTratamiento = copia._ListaTratamiento
    End Sub

    Public Property idCita As String
        Get
            Return _idCita
        End Get
        Set(ByVal value As String)
            _idCita = value
        End Set
    End Property


    Public Property duracion As Integer
        Get
            Return _duracion
        End Get
        Set(ByVal value As Integer)
            _duracion = value
        End Set
    End Property

    Public Property fecha As DateTime
        Get
            Return _fecha
        End Get
        Set(ByVal value As DateTime)
            _fecha = value
        End Set
    End Property
    Public Property horaInicio As DateTime
        Get
            Return _horaInicio
        End Get
        Set(ByVal value As DateTime)
            _horaInicio = value
        End Set
    End Property
    Public ReadOnly Property Empleado As Empleado
        Get
            Return _Empleado
        End Get

    End Property
    Public Property Cliente As Cliente
        Get
            Return _Cliente
        End Get

        Set(ByVal value As Cliente)

        End Set
    End Property
    Public ReadOnly Property ListaTratamiento As List(Of Tratamiento)
        Get
            Return _ListaTratamiento
        End Get
    End Property

    Public Overridable Sub dispose()
        _duracion = 0
        _fecha = New Date
        _horaInicio = New Date
        _Cliente = New Cliente
        _Empleado = New Empleado
        _ListaTratamiento = New List(Of Tratamiento)
    End Sub

    Protected Overrides Sub finalize()
        _duracion = 0
        _fecha = New Date
        _horaInicio = New Date
        _Cliente = New Cliente
        _Empleado = New Empleado
        _ListaTratamiento = New List(Of Tratamiento)
    End Sub

End Class
